package com.fowo.api.service.handleWork;

import com.fowo.api.model.stock.in.StockInConfirmWarehouseAction;
import com.fowo.api.service.impl.StockInServiceImpl;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Component
public class StockInConfirmWarehouse implements StockInConfirmWarehouseAction {

    @Resource
    private StockInServiceImpl stockInService;

    @Transactional(rollbackFor = Exception.class)
    @Override
    public void run(Long id) throws Exception {
        stockInService.ruku(id);
        stockInService.rukucipin(id);
    }
}
